package net.stogi.common.mvp.core.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class KeyValues<K> implements Serializable {

	private static final long serialVersionUID = -242255174021496876L;

	private K key;

	private Map<String, String> valueMap;

	public KeyValues(K key) {
		this();
		this.key = key;
	}

	protected KeyValues() {
		valueMap = new HashMap<String, String>();
	}

	/**
	 * @return the key
	 */
	public K getKey() {
		return key;
	}

	/**
	 * @param key
	 *            the key to set
	 */
	public void setKey(K key) {
		this.key = key;
	}

	public void setValue(String param, String value) {
		valueMap.put(param, value);
	}

	public String getValue(String param) {
		return valueMap.get(param);
	}

	public Set<String> getParams() {
		return valueMap.keySet();
	}
}
